﻿using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LX.NHibernate.Utils
{
    public class LogHelper
    {
        public static ILog _logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
        //public LogHelper()
        //{
        //    _logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
        //}

        public static void Info(string message)
        {
            _logger.Info(message);
        }
        public static void Warn(string message)
        {
            _logger.Warn(message);
        }
        public static void Debug(string message)
        {
            _logger.Debug(message);
        }
        public static void Error(string message)
        {
            _logger.Error(message);
        }
        public static void Error(Exception ex)
        {
            _logger.Error(ex.Message, ex);
        }
        public static void Fatal(string message)
        {
            _logger.Fatal(message);
        }
        public static void Fatal(Exception ex)
        {
            _logger.Fatal(ex.Message, ex);
        }
    }

}
